package bintree

import (
	"fmt"
)

type NotEmptyError struct {
	element interface{}
}

func (n *NotEmptyError) Error() string {
	return fmt.Sprintf("ERROR(%v): not en  empty Element", n.element)
}

type EmptyError struct {
	element interface{}
}

func (n *EmptyError) Error() string {
	return fmt.Sprintf("ERROR(%v): this object is empty", n.element)
}

type NotNodeError struct {
	node *BTNode
}

func (n *NotNodeError) Error() string {
	return fmt.Sprintf("ERROR(%v): is a subtree", n.node)
}

type LockedError struct {
	node *BTNode
}

func (n *LockedError) Error() string {
	return fmt.Sprintf("ERROR(%v): is locked fro insertion", n.node)
}


type NotSearchableError struct {
	element interface{}
}

func (n *NotSearchableError) Error() string {
	return fmt.Sprintf("ERROR(%v): Can't search on this object", n.element)
}

type DuplicateValueError struct {
	element interface{}
}

func (n *DuplicateValueError) Error() string {
	return fmt.Sprintf("ERROR(%v): This object violates duplicatie support rules", n.element)
}

type NotFoundError struct {
	element interface{}
}

func (n *NotFoundError) Error() string {
	return fmt.Sprintf("ERROR(%v): Not found value", n.element)
}


